package com.qingcheng.controller;

import com.qingcheng.entity.Result;
import com.qingcheng.service.MenuService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/menu")
public class MenuController {

    @Autowired
    MenuService menuService;

    @ApiOperation("菜单展示")
    @GetMapping("/findAllMenu")
    public Result findAllMenu() {
        List<Map> allMenu = menuService.findAllMenu();
        return new Result(200,"查询成功",allMenu);
    }

}
